package com.fr.base.core.antlr;

class TokenRefElement extends GrammarAtom
{
  public TokenRefElement(Grammar paramGrammar, Token paramToken, boolean paramBoolean, int paramInt)
  {
    super(paramGrammar, paramToken, paramInt);
    this.not = paramBoolean;
    TokenSymbol localTokenSymbol = this.grammar.tokenManager.getTokenSymbol(this.atomText);
    if (localTokenSymbol == null)
    {
      paramGrammar.antlrTool.error("Undefined token symbol: " + this.atomText, this.grammar.getFilename(), paramToken.getLine(), paramToken.getColumn());
    }
    else
    {
      this.tokenType = localTokenSymbol.getTokenType();
      setASTNodeType(localTokenSymbol.getASTNodeType());
    }
    this.line = paramToken.getLine();
  }

  public void generate()
  {
    this.grammar.generator.gen(this);
  }

  public Lookahead look(int paramInt)
  {
    return this.grammar.theLLkAnalyzer.look(paramInt, this);
  }
}